class Vector
{
    public x;
    public y;
    public constructor(a,b)
    {
        this.x = a;
        this.y = b;
    }
    public rotate(b)
    {
        var a = this.x;
        var c = this.y;
        this.x = Math.cos(b) * a - Math.sin(b) * c;
        this.y = Math.sin(b) * a + Math.cos(b) * c;
        return this;
    }
    public mult(a)
    {
        this.x *= a;
        this.y *= a;
        return this;
    }
    public clone():Vector
    {
        return new Vector(this.x,this.y);
    }
    public length()
    {
        return Math.sqrt(this.x * this.x + this.y * this.y);
    }
    public subtract(a)
    {
        this.x -= a.x;
        this.y -= a.y;
        return this;
    }
    public set(a,b)
    {
        this.x = a;
        this.y = b;
        return this;
    }
}